{% extends "base.html" %}
{% block title %}{{ siteName }} - Edit Deck{% endblock %}
{% block content %}
	<div>Editing a deck</div>
	<div id='editDeckContainerDiv'>
		<form action='/deck/edit-save.html' method='POST' id='editDeck_form'>
			<input type='hidden' name='setKey' id='editDeck_setKey' value='{{setKey|safe}}'/>
			<table class='edit_deck'>
				<tr>
					<td>Title:</td>
					<td><input type='text' id='editDeck_title' name='title' class='inputfield' value='{{title|safe}}'></td>
				</tr>
				<tr>
					<td>Visibility:</td>
					<td><select name='visibility' id='editDeck_visibility'>{{option_list|safe}}</select></td>
				</tr>
				{% if askForEmail %}
				<tr id='editDeck_askForEmail_tr' class='being_used_but_hidden'>
					<td>Email:</td>
					<td>
						<p>If you want to share this set with other users, and you want to receive their feedbacks, you must provide your email address.</p>
						<input type='text' name='email' id='editDeck_email' class='inputfield'/>
					</td>
				</tr>
				{% endif %}
				<tr><td>Study Materials:</td><td><textarea class='loadEditor' style='width: 100%' id='editDeck_materials' name='materials'>{{materials|safe}}</textarea></td></tr>
				<tr>
					<td>Description:</td>
					<td>
						A short introduction of what this set is for.  This is displayed when other user use the search form.
						<textarea id='editDeck_description' class='loadEditor' style='width: 100%' name='description'>{{description|safe}}</textarea>
					</td>
				</tr>
				<tr><td colspan=2><span class='button' id='editDeck_save'>Save</span>&nbsp;<span class='button' id='editDeck_cancel'>Cancel</span></td></tr>
			</table>
		</form>
	</div>
{% endblock %}
